<script>
	import Vue from 'vue';

	export default {
		onLaunch: function() {
			console.log('App Launch')

			// 获取系统信息
			uni.getSystemInfo({
				success: (systemInfo) => {
					// #ifndef MP
					Vue.prototype.statusBar = systemInfo.statusBarHeight;
					if (systemInfo.platform == 'android') {
						Vue.prototype.customBar = systemInfo.statusBarHeight + 50;
					} else {
						Vue.prototype.customBar = systemInfo.statusBarHeight + 45;
					};
					// #endif

					// #ifdef MP-WEIXIN || MP-QQ
					Vue.prototype.statusBar = systemInfo.statusBarHeight;

					let capsule = wx.getMenuButtonBoundingClientRect();

					if (capsule) {
						Vue.prototype.custom = capsule;
						Vue.prototype.customBar = capsule.bottom + capsule.top - systemInfo
							.statusBarHeight + 4;
					} else {
						Vue.prototype.customBar = systemInfo.statusBarHeight + 50;
					}
					// #endif		

					// #ifdef MP-ALIPAY
					Vue.prototype.statusBar = systemInfo.statusBarHeight;
					Vue.prototype.customBar = systemInfo.statusBarHeight + systemInfo.titleBarHeight;
					// #endif
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */

	/* colorui begin */
	@import url("libs/colorui/main.css");
	@import url("libs/colorui/icon.css");

	[class*=cuIcon].lg {
		font-size: 36rpx;
	}

	[class*=cuIcon].xl {
		font-size: 48rpx;
	}

	.bg-gradual-blue-plus {
		background-image: linear-gradient(45deg, #66b0f7, #426af7);
		color: #ffffff;
	}

	.text-primary,
	.line-primary,
	.lines-primary {
		color: #57bef2;
	}
	
	.line-primary::after,
	.lines-primary::after {
		border-color: #57bef2;
	}

	.bg-primary {
		background-color: #57bef2;
	}

	.bg-gradual-primary {
		background-image: linear-gradient(45deg, #a6defb, #57bef2);
		color: #ffffff;
	}
	
	.text-yellow-extend,
	.line-yellow-extend,
	.lines-yellow-extend {
		color: #eff246;
	}
	
	.text-green-extend,
	.line-green-extend,
	.lines-green-extend {
		color: #08b35d;
	}
	
	.line-yellow-extend::after,
	.lines-yellow-extend::after {
		border-color: #eff246;
	}
	
	.line-green-extend::after,
	.lines-green-extend::after {
		border-color: #08b35d;
	}
	
	.bg-yellow-extend {
		background-color: #eff246;
	}
	
	.bg-green-extend {
		background-color: #08b35d;
	}
	
	.bg-gradual-yellow-extend {
		background-image: linear-gradient(45deg, #f9fb9a, #eff246);
		color: #ffffff;
	}
	
	.bg-gradual-green-extend {
		background-image: linear-gradient(45deg, #7eda8b, #08b35d);
		color: #ffffff;
	}
	
	.bg-transparent {
		background-color: transparent;
	}
	
	.no-data {
		width: 10rem;
		height: 10rem;
		background-image: url('');
		background-size: contain;
	}
	
	.scroll-x-wrapper {
		width: 100%;
		white-space: nowrap;
	}
	
	.inline-block {
		display: inline-block;
	}

	/* colorui end */
</style>
